import request from "@/utils/request.js";
import { Tabs } from "@nutui/nutui-react-taro";
import { View } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import { useState } from "react";
definePageConfig({
    navigationBarTitleText: '我的订单'
})

export default function myOrder(){
    const [tabvalue, setTabvalue] = useState<string | number>('0')
  useLoad(() => {
    getOrderList();
  })
    const getOrderList=()=>{
        request({url:'api/account/money/order',data:{current:1,size:10,paystatus:1}}).then(res=>{
        //   setAccInfo(res.data)
        })
       }
    return <View>
   <Tabs
      value={tabvalue}
      onChange={(value) => {
        setTabvalue(value)
      }}
      style={{
        //@ts-ignore
        '--nutui-tabs-titles-background-color':'#ffffff',
        '--nutui-tabs-titles-item-active-color':'#EC6138',
        '--nutui-tabs-titles-font-size':'$font-size-md',
        '--nutui-tabs-titles-height':'100rpx',
        '--nutui-tabs-tab-line-width':'50rpx',
        '--nutui-tabs-tab-line-height':'6rpx',
        '--nutui-tabs-tab-line-color':'#EC6138',

      }}
      activeColor="#EC6138"
    >
      <Tabs.TabPane title="全部"> Tab 1 </Tabs.TabPane>
      <Tabs.TabPane title="待支付"> Tab 2 </Tabs.TabPane>
      <Tabs.TabPane title="已支付"> Tab 3 </Tabs.TabPane>
      <Tabs.TabPane title="已取消"> Tab 3 </Tabs.TabPane>
      <Tabs.TabPane title="已退款"> Tab 3 </Tabs.TabPane>
    </Tabs>
    </View>
}